import { reactive } from "vue";

export default function useOpenModal() {

  const rowDate: any = reactive({
    id: "",
    channel: "",
    userId: ""
  });
  const openModal = (record: any,) => {
    const { id, channel, userId } = record;
    rowDate.id = id;
    rowDate.channel = channel;
    rowDate.userId = userId;
  }
  const closeModal = (callback?: any) => {
    callback && callback()
  }

  return {
    rowDate,
    openModal,
    closeModal
  }
}